package cn.tedu.boyou.acticle.service.impl;

import cn.tedu.boyou.acticle.domain.SaleType;
import cn.tedu.boyou.acticle.mapper.SaleTypeMapper;
import cn.tedu.boyou.acticle.service.ISaleTypeService;
import com.alibaba.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service
public class SaleTypeServiceImpl implements ISaleTypeService{

    @Autowired
    private SaleTypeMapper saleTypeMapper;

    @Override
    public void insert(SaleType sale) {
        saleTypeMapper.insert(sale);
    }

    @Override
    public List<SaleType> listAll() {
        return saleTypeMapper.selectAll();
    }

    @Override
    public SaleType getByPrimaryKey(Long id) {
        return saleTypeMapper.selectByPrimaryKey(id);
    }
}
